Closed Bug 1384848 Opened 8 years ago Closed 8 years ago

Remove dead code in XPCConvert.cpp

Categories

(Core :: XPConnect, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [CID 1274675])

Attachments

(1 file)

if (0 != count), we already exited the function if (0 != count) { if (pErr) *pErr = NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING; return false; } The rest is dead code
Assignee: nobody → sledru
Comment on attachment 8890738 [details] Bug 1384848 - Remove dead code in XPCConvert.cpp https://reviewboard.mozilla.org/r/161938/#review167292 Not super-familiar with this code. It looks like the code was inadvertently made dead in bug 677788. I would r+, but maybe there's a secret bug lurking in here somewhere? OTOH, given that we've had this behavior for six years, maybe nothing really relies on it? I'd feel a little better if somebody who knew things about xpconnect gave this a once-over; I'll redirect the review. ::: js/xpconnect/src/XPCConvert.cpp:1757 (Diff revision 1) > if (0 != count) { > len = (count + 1) * sizeof(char16_t); > if (!(*((void**)d) = moz_xmalloc(len))) > return false; > return true; > } > This code is also likewise dead, isn't it?
Comment on attachment 8890738 [details] Bug 1384848 - Remove dead code in XPCConvert.cpp Blake reviewed bug 677788, so maybe he knows something about this code?
Attachment #8890738 - Flags: review?(nfroyd) → review?(mrbkap)
Comment on attachment 8890738 [details] Bug 1384848 - Remove dead code in XPCConvert.cpp https://reviewboard.mozilla.org/r/161938/#review167542 This looks right to me.
Attachment #8890738 - Flags: review?(mrbkap) → review+
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8816877de730 Remove dead code in XPCConvert.cpp r=mrbkap
Sylvestre, did you see comment 2 (last paragraph)?
Flags: needinfo?(sledru)
done, sorry
Flags: needinfo?(sledru)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: